package com.jdy.hotel.net;

import com.jdy.hotel.net.callback.BaseCallback;
import com.jdy.hotel.utils.L;
import com.zhy.http.okhttp.OkHttpUtils;

import java.util.Map;

public class NetWork {

    public static void doGet(String url, Map<String, String> params, BaseCallback callback) {
        L.i("调用网络数据Get请求， 参数列表： %s", params);
        OkHttpUtils.get().addHeader("contentType", "application/json").url(url).params(params).build().execute(callback);
    }

    public static void doPost(String url, Map<String, String> params, BaseCallback callback) {
        L.i("调用网络数据Post请求， 参数列表： %s", params);
        OkHttpUtils.post().addHeader("contentType", "application/json").url(url).params(params).build().execute(callback);
    }

}
